﻿using System;

namespace Luna.Connectors.ZohoCRM
{
    [ModuleName("Attachments")]
    [AllowInserts(false)]
    public sealed class ZohoAttachment : ZohoEntity
    {
        internal static class Fields
        {
            public const string ID = "id";
            public const string FILE_NAME = "File Name";
            public const string SIZE = "Size";
            public const string ATTACHED_BY = "Attached By";
            public const string MODIFIED_TIME = "Modified Time";
        }

        internal ZohoAttachment()
        {
        }

        protected override string IdFieldName
        {
            get { return Fields.ID; }
        }

        public string FileName
        {
            get { return GetString(Fields.FILE_NAME); }
        }

        //TODO: convert this to a numeric value
        public string Size
        {
            get { return GetString(Fields.SIZE); }
        }

        public string AttachedBy
        {
            get { return GetString(Fields.ATTACHED_BY); }
        }

        public DateTime ModifiedTime
        {
            get { return GetDateTime(Fields.MODIFIED_TIME); }
        }
    }
}